libotutil: Fix two bugs in usage of posix_fallocate()
authorColin Walters <walters@verbum.org>
Tue, 29 Apr 2014 11:40:25 +0000 (07:40 -0400)
committerColin Walters <walters@verbum.org>
Tue, 29 Apr 2014 11:40:25 +0000 (07:40 -0400)
commit5346e0615be2af2ee5a6c8055dd731c90e5b45e9
treea97d6b47e337551d066ad300a1301c4829491e71
parent22ab7b3e79ecd3d43d616dbca74b3e0b24233f04
libotutil: Fix two bugs in usage of posix_fallocate()

* It's invalid to call it with a size of 0, so don't do that.

* posix_* apparently don't set errno.  So capture the return value and
  use that.
src/libotutil/ot-gio-utils.c